<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改栏目</title>
<link rel="stylesheet" type="text/css" href="template/admin.css"/>
<script type="text/javascript" src="template/images/jquery.js"></script>
<script type="text/javascript" src="template/images/ck_form.js"></script>
<script type="text/javascript" src="template/images/dialog-min.js"></script>
<link type="text/css" href="template/images/dialog/dialog.css" rel="stylesheet" />
<script type="text/javascript">
$(document).ready(function(){
	$('.q').find('ul li').click(function(){
		$index=$('.q').find('ul li').index(this);
		$('#tb').find('#sys').eq($index).show().siblings().hide();
	});
	$('.info_qh').find('ul li').click(function(){
		$index=$('.info_qh').find('ul li').index(this);
		$(this).addClass('on').siblings().removeClass('on');
		$('#tb').find('div').eq($index).show().siblings().hide();
	});
	
});

$(document).ready(function(){
var channel_list= new Array();
<?php
if(!empty($channel)){
foreach($channel as $k=>$v)
{
echo "channel_list[{$v['id']}] = \"{$v['channel_mark']}\";\r\n";
}

}
?>
	$('#channel').change(function(){
		$value=channel_list[$(this).val()];
		$('#index_tpl').val('index_'+$value+'.html');
		$('#list_tpl').val('list_'+$value+'.html');
		$('#content_tpl').val($value+'_content.html');
		if($value=="alone"){
			$('#tpl').hide();
			$('#gdlm').hide();
			$('#alone').show().find('input').attr('checked','checked');
		}else{
			$('#tpl').show().find('input').eq(0).attr('checked','checked');
			$('#gdlm').show();
			$('#alone').hide();
		}
		
		if($value=="mx_form"){
			$('#sl_form').show();
		}else{
			$('#sl_form').hide();
		}
		
		//($value=="order")?$('#order').show():$('#order').hide();
	});
});

function show_url(n){
$(n).show();
}
function hide_url(n){
$(n).hide();
}
</script>

</head>

<body>
<div class="admin_head">
	<div class="admin_logo"><img src="template/images/admin_logo.gif" border="0"/></div>
	<div class="admin_head_rigt">
		<div class="admin_info">
		管理员<label><?php echo $rel_admin[0]['admin_name'];?></label>欢迎回来</span><span>上次登陆时间:<label style="font-weight:normal"><?php echo empty($rel_admin[0]['admin_time'])?'':date('Y-m-d H:m:s',$rel_admin[0]['admin_time']);?></label></span><span>上次登陆IP:<label style="font-weight:normal"><?php echo $rel_admin[0]['admin_ip']; unset($rel_admin);?></label></span><span>本次登陆IP:<label style="font-weight:normal"><?php echo get_ip();?></label></label>
		</div><!--登录的一些信息-->
		<div class="admin_head_nav">
			
			<ul class="out_nav">
				<li><a href="admin_cache.php?action=del_cache_file">清除缓存</a></li>
				<li><a href="../index.php" target="_blank">网站主页</a></li>
				<li><a href="login.php?action=out">退出登录</a></li>
			</ul>
			<div class="clear"></div>
		</div><!--主导航-->
	</div>
	<div class="clear"></div>	
</div>

<div class="cms_admin_main">
	
	<div class="cms_admin_left_nav">
		<div class="admin_contain_left">
		
		<div class="admin_small_nav">
			
			<?php include('admin_nav.php')?>
			
			
		</div>
	</div><!--左边-->
	</div><!--nav-->
	
	<div class="cms_main_right">
		<div class="cms_main_content">
		
		<div class="admin_position">
		<span>修改栏目</span>
			<div class="admin_fh"><a href="?action=catagory&lang=<?php echo $lang;?>&nav=<?php echo $admin_nav;?>&admin_p_nav=<?php echo $admin_p_nav;?>">返回</a></div>
		</div><!--位置-->
		
	<!--内容区-->	

		
<div class="order_contain">
	<form name="add_cata" action="admin_catagory.php?nav=<?php echo $admin_nav;?>&admin_p_nav=<?php echo $admin_p_nav;?>" method="post" class="form">
	 <div class="order_main">
 <div class="info_qh" style="margin-top:20px;">
 <ul>
  <li class="on">基本设置</li>
  <li>高级设置</li>
 </ul>
 <div class="clear"></div>
</div>
<div id="tb">
 <div id="sys1" style="display:block">
 <table cellpadding="0" cellspacing="0" width="100%" class="table_info1">
 	<thead>
		<tr><th class="w1">参数</th><th style="width:80%">参数值</th></tr>
	</thead>
	<tbody>
		
		<tr>
		  <td class="w1" style="text-align:center"><span title="不同的内容模型使用不同的模板和发布不同的内容" class="help">内容模型:</span></td><td style="width:80%">
		  <?php echo get_channel_list($arr[0]['cate_channel']);?>
		  </td>
		</tr>
		
		<tr id="sl_form" <?php if($arr[0]['cate_channel']=='-9'){?>style=""<?php }else{?>style="display:none" <?php }?>>
		  <td style="width:20%;text-align:center" class="w1">选择表单：</td><td style="width:80%">
		 <?php echo get_form_list($arr[0]['form_id']);?>
		 </td>
		</tr>
		

		<tr>
		  <td class="w1" style="text-align:center"><span title="请不要使用其它字符做栏目名" class="help">栏目名称:</span></td><td style="width:80%"><input type="text" name="cate_name" title="栏目名称" reg="[^0]" style="width:30%;display:block; float:left" value="<?php echo $arr[0]['cate_name'];?>"/><span name="easyTip">不能为空</span></td>
		</tr>
		
		<tr>
		  <td class="w1" style="text-align:center"><span title="设置是否显示在导航上" class="help">导航显示:</span></td><td style="width:80%">
		  <?php $cate_nav=empty($arr[0]['cate_nav'])?array(''):explode(',',$arr[0]['cate_nav']);?>
		  <label for="f1"><input type="checkbox" id="f1" style="border:0; margin-top:3px;" value="2" name="cate_nav[]" <?php if(in_array('2',$cate_nav)){?>checked="checked"<?php }?>  />中部显示</label><label for="f2"><input type="checkbox" id="f2" value="3" style="border:0; margin-top:3px;" name="cate_nav[]" <?php if(in_array('3',$cate_nav)){?>checked="checked"<?php }?>/>底部显示</label><span style="padding-left:50px; color:red">不勾选导航不会显示栏目</span></td>
		</tr>
		
	
		
		<tr>
		  <td class="w1" style="text-align:center">内容显示数量:</td><td style="width:80%"><input type="text" name="list_num" style="width:20%" value="<?php echo $arr[0]['list_num'];?>"/>仅对列表页起作用</td><td class="w3"></td>
		</tr>
		
		<tr>
		  <td class="w1" style="text-align:center">栏目使用页面:</td><td style="width:80%">
		  <p id="tpl" <?php if(intval($arr[0]['cate_tpl'])==3){echo "style=\"display:none\"";}?>><label for="f3" style="width:100%"><input id="f3" type="radio" name="cate_tpl" value="0" style=" border:0; margin-top:3px;" <?php if(intval($arr[0]['cate_tpl'])==0){?>checked="checked"<?php }?> onclick="hide_url('#show_url');" />列表页</label><br />
		 </p>
		
		  <p id="alone" <?php if(intval($arr[0]['cate_tpl'])==3){echo "style=\"display:block\"";}else{echo "style=\"display:none\"";}?>><label for="f5" style="width:100%"><input id="f5" type="radio" value="3" <?php if(intval($arr[0]['cate_tpl'])==3){?>checked="checked"<?php }?> name="cate_tpl" style="border:0; margin-top:3px;"  onclick="hide_url('#show_url');"/>单页面</label></p>
		  <p><label for="f6" style="width:100%"><input id="f6" type="radio" name="cate_tpl" value="2" style="border:0; margin-top:3px;" onclick="show_url('#show_url');" <?php if(intval($arr[0]['cate_tpl'])==2){?>checked="checked"<?php }?> />外部链接(链接到其他网站)</label></p></td>
		</tr>
		<tr id="show_url" style="display:<?php if(intval($arr[0]['cate_tpl'])==2){echo "";}else{echo "none";}?>">
		  <td class="w1" style="text-align:center"><span title="将会进入链接地址" class="help">外部链接地址:</span></td><td style="width:80%"><input type="text" name="cate_url" style="width:30%" value="<?php echo $arr[0]['cate_url'];?>"/></td>
		</tr>
		</tbody>
		</table>
		</div>
		
		<div id="sys2" style="display:none">
		 <table cellpadding="0" cellspacing="0" width="100%" class="table_info1">
 	<thead>
		<tr><th class="w1">参数</th><th style="width:80%">参数值</th></tr>
	</thead>
		<tbody >
		<tr>
		  <td class="w1" style="text-align:center">排列顺序:</td><td style="width:80%"><input type="text" name="cate_order" style="width:20%" value="<?php echo $arr[0]['cate_order'];?>"/></td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center"><span title="只能使用数字" class="help">自定义导航显示:</span></td><td style="width:80%"><input type="text" title="自定义导航显示" name="nav_show" style="width:8%" value="<?php echo $arr[0]['nav_show'];?>"/><em style="font-style:normal; color:#FF0000">需要模板支持</em>，只能填写数字&nbsp;</td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center"><span title="只能使用数字" class="help">模板标示ID:</span></td><td style="width:80%"><input type="text" title="模板标示ID" name="temp_id" style="width:10%" value="<?php echo $arr[0]['temp_id'];?>"/>模板中内容调用输出使用，只能填写数字，同一种语言下的ID不能重复</td>
		</tr>
		
		
		<tr>
		  <td class="w1" style="text-align:center"><span title="列表页使用的模板" class="help">列表页模板:</span></td><td style="width:80%"><input type="text" name="cate_tpl_list" id="list_tpl" style="width:80%" value="<?php echo $arr[0]['cate_tpl_list'];?>"/></td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center"><span title="内容页面使用的模板" class="help">内容页模板:</span></td><td style="width:80%"><input type="text" name="cate_tpl_content" id="content_tpl" style="width:80%" value="<?php echo $arr[0]['cate_tpl_content'];?>"/></td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center">栏目标题(SEO):</td><td style="width:80%"><input type="text" name="cate_title_seo" style="width:80%" value="<?php echo $arr[0]['cate_title_seo'];?>"/></td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center">栏目关键字(SEO):</td><td style="width:80%"><input type="text" name="cate_key_seo" style="width:80%" value="<?php echo $arr[0]['cate_key_seo'];?>"/></td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center">栏目描述(SEO):</td><td style="width:80%"><textarea name="cate_info_seo" style="width:80%; height:50px"><?php echo $arr[0]['cate_info_seo'];?></textarea></td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center">栏目图片1:</td><td style="width:80%"><input name="cate_pic1" value="<?php echo $arr[0]['cate_pic1'];?>" style="width:30%; display:block; float:left; margin-top:55px;" id="thumb" />
		  <p style="margin-top:55px;" class="admin_up_pic"><a href="#" id="cate_pic1_btn">上传图片</a></p><span id="show_thumb" class="admin_show_pic">
		  <?php 
		  if($arr[0]['cate_pic1']){
		  ?>
		  <a href="../upload/<?php echo $arr[0]['cate_pic1'];?>" target="_blank"><img src="../upload/<?php echo $arr[0]['cate_pic1'];?>"  height="120" width="120"/></a>
		  <?php
		  }else{
		  ?>
		  <a href="#" id="cate_pic1_btn1"><img src="../upload/no_pc.gif"  height="120" width="120"/></a>
		  <?php }?>
		  </span>
		  </td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center">栏目图片2:</td><td style="width:80%"><input name="cate_pic2" value="<?php echo $arr[0]['cate_pic2'];?>" style="width:30%; display:block; float:left; margin-top:55px;" id="pic2" />
		    <p style="margin-top:55px;" class="admin_up_pic"><a href="#" id="cate_pic2_btn">上传图片</a></p><span id="show_pic2" class="admin_show_pic">
			 <?php 
		  if($arr[0]['cate_pic2']){
		  ?>
		  <a href="../upload/<?php echo $arr[0]['cate_pic2'];?>" target="_blank"><img src="../upload/<?php echo $arr[0]['cate_pic2'];?>"  height="120" width="120"/></a>
		  <?php
		  }else{
		  ?>
		  <a href="#" id="cate_pic2_btn1"><img src="../upload/no_pc.gif"  height="120" width="120"/></a>
		  <?php }?>
			</span>
		  </td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center">栏目图片3:</td><td style="width:80%"><input name="cate_pic3" value="<?php echo $arr[0]['cate_pic3'];?>" style="width:30%; display:block; float:left; margin-top:55px;" id="pic3" />
		   <p style="margin-top:55px;" class="admin_up_pic"><a href="#" id="cate_pic3_btn">上传图片</a></p><span id="show_pic3" class="admin_show_pic">
		    <?php 
		  if($arr[0]['cate_pic3']){
		  ?>
		  <a href="../upload/<?php echo $arr[0]['cate_pic3'];?>" target="_blank"><img src="../upload/<?php echo $arr[0]['cate_pic3'];?>"  height="120" width="120"/></a>
		  <?php
		  }else{
		  ?>
		  <a href="#" id="cate_pic3_btn1"><img src="../upload/no_pc.gif"  height="120" width="120"/></a>
		  <?php }?>
		   </span>
		  </td>
		</tr>
		<tr>
		  <td class="w1" style="text-align:center">栏目简介:</td><td style="width:80%">
		  <?php
		 echo $GLOBALS['CKEditor']->editor("cate_content", $arr[0]['cate_content'],$fck_config);
		 ?>
		  </td>
		</tr>
		</tbody>
	
 </table>
 </div>
 </div>
 </div>
<div class="order_btn">
<input type="hidden" name="action" value="save_xg"/><input type="hidden" name="lang" value="<?php echo $lang;?>"/><input type="hidden" name="id" value="<?php echo $id;?>"/><input type="hidden" value="<?php echo $parent;?>" name="parent"/>
  <input type="submit" value="确定" name="xg_category" class="go"/><input type="reset" class="go" value="重置" name="reset"/>(无法提交请检查是否有遗漏或填写错误)
 </div>
 </form>
</div>

<!--内容区-->

		</div>	
	</div><!--main-->
	<div class="clear"></div>
</div>
<div class="cms_admin_foot">
	<p>版权所有 © 2018-2020 BrightChess，并保留所有权利。</p>
</div>	

<script type="text/javascript">
$('#cate_pic1_btn').wBox({title:'栏目图片',requestType: "iframe",target:"admin_pic_upload.php?type=radio&get=thumb",iframeWH:{width:800,height:400}});
$('#cate_pic1_btn1').wBox({title:'栏目图片',requestType: "iframe",target:"admin_pic_upload.php?type=radio&get=thumb",iframeWH:{width:800,height:400}});
$('#cate_pic2_btn').wBox({title:'栏目图片',requestType: "iframe",target:"admin_pic_upload.php?type=radio&get=pic2",iframeWH:{width:800,height:400}});
$('#cate_pic2_btn1').wBox({title:'栏目图片',requestType: "iframe",target:"admin_pic_upload.php?type=radio&get=pic2",iframeWH:{width:800,height:400}});
$('#cate_pic3_btn').wBox({title:'栏目图片',requestType: "iframe",target:"admin_pic_upload.php?type=radio&get=pic3",iframeWH:{width:800,height:400}});
$('#cate_pic3_btn1').wBox({title:'栏目图片',requestType: "iframe",target:"admin_pic_upload.php?type=radio&get=pic3",iframeWH:{width:800,height:400}});
</script>
</body>
</html>
